'use strict';

angular.module('App').controller('InstallListController', ['$scope', 'BaseFunction', 'BaseModule', 'BaseEnum', '$location', 'Authentication',
    function($scope, BaseFunction, BaseModule, BaseEnum, $location, Authentication) {
    	$scope.DeviceTypeEnum = BaseFunction.getEnum('AppEnum.DeviceType');

    	BaseModule.initModule($scope, 'App');
        $scope.Module.App.LoadMode = BaseEnum.LoadMode.CacheAndPaging;
        $scope.Module.App.PageSize = 15;
        $scope.Module.App.Condition = {Type : 6};
        $scope.Module.App.OrderBy = {AppID: 1};
        

        $scope.btnAdd = function(){
        	$location.url('/index/Install/Add');
        };

        $scope.rowDblClick = function(){
            
            $location.url("/index/Install/Add/" + $scope.Module.App.FocusedRecord._id);
            
        };

        $scope.btnDelete = function(){
        	$scope.Module.App.deleteSelecteds();
        };
    }
]);
